package com.es.code.user.enity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

/**
 * @author jichf
 * @Description
 * @create 2021-11-04 9:21
 */

@Data
@Document(indexName = "es_user", createIndex = false)
public class ESUser {
    @Id
    private Long id;
    @Field(type = FieldType.Text)
    private String name;
    @Field(type = FieldType.Integer)
    private Integer age;
    @Field(type = FieldType.Keyword)
    private List<String> tags;
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String desc;
}
